package com.qhit.service.impl;

import com.qhit.dao.OrderMapper;
import com.qhit.pojo.Order;
import com.qhit.pojo.Tourist;
import com.qhit.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Service
public class OrderServiceImpl implements OrderService {
@Autowired
private OrderMapper orderMapper;
    public List<Map> getList(HashMap hashMap) {
        return orderMapper.getList(hashMap);
    }

    public long getListCount(HashMap hashMap) {
        return orderMapper.getListCount(hashMap);
    }

    public int add(Order order) {
        return orderMapper.add(order);
    }

    public Order getOrderById(String id) {
        return orderMapper.getOrderById(id);
    }

    public int del(String id) {
        return orderMapper.del(id);
    }

    public int edit(Order order) {
        return orderMapper.edit(order);
    }

    public List<Tourist> getTourist(String orderid) {

        return orderMapper.getTourist(orderid);
    }

    public List<Tourist> getTouristOut(String orderid) {
        return orderMapper.getTouristOut(orderid);
    }

    public int addTourist(String orderid, String tourist_id) {
        return orderMapper.addTourist(orderid,tourist_id);


    }

    public int delTourist(String orderid, String tourist_id) {
        return orderMapper.delTourist(orderid,tourist_id);
    }
}
